//
//  MJRefreshStateHeader.h
//  MJRefresh
//
//  Created by MJ Lee on 15/4/24.

//

#if __has_include(<MJRefresh/MJRefreshHeader.h>)
#import <MJRefresh/MJRefreshHeader.h>
#else
#import "MJRefreshHeader.h"
#endif

NS_ASSUME_NONNULL_BEGIN

@interface MJRefreshStateHeader : MJRefreshHeader
@property (copy, nonatomic, nullable) NSString *(^lastUpdatedTimeText)(NSDate * _Nullable lastUpdatedTime);
@property (weak, nonatomic, readonly) UILabel *lastUpdatedTimeLabel;

@property (assign, nonatomic) CGFloat labelLeftInset;

@property (weak, nonatomic, readonly) UILabel *stateLabel;

- (instancetype)setTitle:(NSString *)title forState:(MJRefreshState)state;
@end

@interface MJRefreshStateHeader (ChainingGrammar)

- (instancetype)modifyLastUpdatedTimeText:(NSString * (^)(NSDate * _Nullable lastUpdatedTime))handler;

@end

NS_ASSUME_NONNULL_END
